package org.rcgwt.client.ui.grid.model;

/**
 * 
 * {@link IDataModel} with edit mode
 * 
 * @author Matthieu ROBERT
 *
 */
public interface IEditableDataModel extends IDataModel {


    /**
     * Returns true if the cell at <code>rowIndex</code> and
     * <code>columnIndex</code> is editable. Otherwise, <code>setValueAt</code>
     * on the cell will not change the value of that cell.
     * 
     * @param rowIndex
     *            the row whose value to be queried
     * @param columnName
     *            the column whose value to be queried
     * @return true if the cell is editable
     * @see #setValueAt
     */
    boolean isCellEditable(int rowIndex, String columnName);
    
    
    /**
     * Sets the value in the cell at <code>columnIndex</code> and
     * <code>rowIndex</code> to <code>aValue</code>.
     * 
     * @param aValue
     *            the new value
     * @param rowIndex
     *            the row whose value is to be changed
     * @param columnName
     *            the column whose value is to be changed
     * @see #getValueAt
     * @see #isCellEditable
     */
    void setValueAt(Object aValue, int rowIndex, String columnName);

    
 
}
